home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 February / EnigmA AMIGA RUN 15 (1997)(G.R. Edizioni)(IT)[!][issue 1997-02][PLANET CD V].iso / enigma / earcd / emula / arosdv19.lha / AROS / intuition / drawimagestate.c < prev    next >
C/C++ Source or Header  |  1996-11-08  |  2KB  |  104 lines

  1. /*
  2.     (C) 1995-96 AROS - The Amiga Replacement OS
  3.     $Id: drawimagestate.c,v 1.3 1996/11/08 11:28:01 aros Exp $
  4.     $Log: drawimagestate.c,v $
  5.     Revision 1.3  1996/11/08 11:28:01  aros
  6.     All OS function use now Amiga types
  7.  
  8.     Moved intuition-driver protos to intuition_intern.h
  9.  
  10.     Revision 1.2  1996/10/24 15:51:19  aros
  11.     Use the official AROS macros over the __AROS versions.
  12.  
  13.     Revision 1.1  1996/10/23 15:33:51  aros
  14.     Three new functions: DrawImageState(), EraseImage() and PointInImage()
  15.     by C. Aldi.
  16.  
  17.     First version of IMAGECLASS by C. Aldi
  18.  
  19.  
  20.     Desc:
  21.     Lang: english
  22. */
  23. #include "intuition_intern.h"
  24. #include <intuition/classusr.h>
  25. #include <clib/alib_protos.h>
  26.  
  27. /*****************************************************************************
  28.  
  29.     NAME */
  30.     #include <graphics/rastport.h>
  31.     #include <intuition/intuition.h>
  32.     #include <intuition/imageclass.h>
  33.     #include <clib/intuition_protos.h>
  34.  
  35.     AROS_LH6(void, DrawImageState,
  36.  
  37. /*  SYNOPSIS */
  38.     AROS_LHA(struct RastPort *, rp,         A0),
  39.     AROS_LHA(struct Image    *, image,      A1),
  40.     AROS_LHA(LONG             , leftOffset, D0),
  41.     AROS_LHA(LONG             , topOffset,  D1),
  42.     AROS_LHA(ULONG            , state,      D2),
  43.     AROS_LHA(struct DrawInfo *, drawInfo,   A2),
  44.  
  45. /*  LOCATION */
  46.     struct IntuitionBase *, IntuitionBase, 103, Intuition)
  47.  
  48. /*  FUNCTION
  49.     This function renders an image in a certain state.
  50.  
  51.     INPUTS
  52.     rp - Render in this RastPort
  53.     image - Render this image
  54.     leftOffset, topOffset - Add this offset to the position stored in the
  55.         image.
  56.     state - Which state (see intuition/imageclass.h for possible
  57.         valued).
  58.     drawInfo - The DrawInfo from the screen.
  59.  
  60.     RESULT
  61.     None.
  62.  
  63.     NOTES
  64.     DrawImageState(), handles both boopsi and conventional images.
  65.  
  66.     EXAMPLE
  67.  
  68.     BUGS
  69.  
  70.     SEE ALSO
  71.  
  72.     INTERNALS
  73.  
  74.     HISTORY
  75.     29-10-95    digulla automatically created from
  76.                 intuition_lib.fd and clib/intuition_protos.h
  77.  
  78. *****************************************************************************/
  79. {
  80.     AROS_LIBFUNC_INIT
  81.     AROS_LIBBASE_EXT_DECL(struct IntuitionBase *,IntuitionBase)
  82.  
  83.     if (image != NULL)
  84.     {
  85.     if (image->Depth == CUSTOMIMAGEDEPTH)
  86.     {
  87.         DoMethod ((Object *)image
  88.         , IM_DRAW
  89.         , rp
  90.         , (WORD)leftOffset
  91.         , (WORD)topOffset
  92.         , state
  93.         , drawInfo
  94.         );
  95.     }
  96.     else
  97.     {
  98.         DrawImage (rp, image, leftOffset, topOffset);
  99.     }
  100.     }
  101.  
  102.     AROS_LIBFUNC_EXIT
  103. } /* DrawImageState */
  104.